function swapRequestType(type) {
	
	$("#request-incoming, #request-outgoing").hide();
	$("#request-incoming, #request-outgoing").attr('name', 'getid-off');
	$("#" + type).show();
	$("#" + type).attr('name', 'getid');
}

function swapOfferType(type) {
	
	$("#offer-incoming, #offer-outgoing").hide();
	$("#offer-incoming, #offer-outgoing").attr('name', 'getid-off');
	$("#" + type).show();
	$("#" + type).attr('name', 'getid');
}

function swapAcceptType(type) {
	
	$("#accept-incoming, #accept-outgoing").hide();
	$("#accept-incoming, #accept-outgoing").attr('name', 'getid-off');
	$("#" + type).show();
	$("#" + type).attr('name', 'getid');
}

function swapAcceptedType(type) {
	
	$("#accepted-incoming, #accepted-outgoing").hide();
	$("#accepted-incoming, #accepted-outgoing").attr('name', 'getid-off');
	$("#" + type).show();
	$("#" + type).attr('name', 'getid');
}

function populateDadfHost(host) {
	$("#remote-dadf-server").val("http://" + host);
}

function setRemoteHost(hostid) {
	$("#" + hostid + " input[name=remotehost]").val($("#remote-dadf-server").val());
}


